There are some situations where modifying the SQLite database that Trilium uses is desirable.
If you are doing any advanced development or troubleshooting where you
manually modify the database, you might want to consider creating backups
of your document.db file.
The SQL Console is Trilium's built-in database editor.
See SQL Console.
Sometimes the SQL Console cannot be used (for example if the application cannot start).
When making external modifications, consider closing the desktop application. If modifying the server database, then stop the service or Docker container.
DB Browser for SQLite is a cross-platform editor that can be used to alter the database using a graphical user interface.
To do so:
First, start the SQLite 3 CLI by specifying the path to the database:
sqlite3 ~/.local/share/trilium-data/document.db
; character..quit and enter.